package org.lanqiao.tjut.Test;

import java.util.List;

import org.apache.commons.dbutils.handlers.MapListHandler;
import org.junit.Test;
import org.lanqiao.tjut.db.DBDriverFactory;

import oracle.net.aso.n;

public class Practice {
	@Test
	public void s() {
		String strSQL = "select * from stinfor";
		List lst = (List) DBDriverFactory.getDBDriverInstance().
				query(strSQL, new MapListHandler());
		//printList(lst);
		System.out.println(lst.get(0));
	}
	@Test
	public void test06() {
		int fj=1;
		String ni="简孙";
		int id=6;
		// TODO Auto-generated method stub
		 String strSQL1="update s"+fj+" set s_nickname='"+ni+"' where s_id="+id;
		   int j=DBDriverFactory.getDBDriverInstance().update(strSQL1);
		   
	       System.out.println(j>0?"添加成功":"添加失败");
	}
	@Test
	private void fri() {
		// TODO Auto-generated method stub
		
	   

	}
	@Test
	private void num() {
		// TODO Auto-generated method stub
		long n=1510228167;

	}

	private void printList(List lst) {

		System.out.println("list集合存储的二维表格内容：");
		for (int i = 0; i < lst.size(); i++) {
			System.out.println(lst.get(i).toString());
		}
	}
}
